package Merlion.util.state;

import java.io.Serializable;
import java.text.SimpleDateFormat;

public class ReservationState implements Serializable {

    private Long id;
    private Long productId;
    private int quantity;
    private String reservationType; //PDD, BKO, INV
    private String status;
    private String availabilityDate;
    private boolean voided;
    private boolean picked;
    //reservation on planned demand (PDD)
    private String plannedDailyDemandId;
    //reservation on product batch (INV)
    private Long batchId;
    private Long warehouseId;
    //reservation on unplanned demand (BKO - BackOrder)
    private Long unplannedDailyDemandId;

    public ReservationState() {
    }

    public void createReservation_PDD(Long id, Long productId, int quantity, String status, boolean voided, boolean picked, String plannedDailyDemandId) {
        this.id = id;
        this.productId = productId;
        this.quantity = quantity;
        this.reservationType = "PDD";
        this.status = status;
        this.voided = voided;
        this.picked = picked;
        this.plannedDailyDemandId = plannedDailyDemandId;
        this.warehouseId = new Long(0);
    }

    public void createReservation_INV(Long id, Long productId, int quantity, String status, boolean voided, boolean picked, Long batchId, Long warehouseId) {
        this.id = id;
        this.productId = productId;
        this.quantity = quantity;
        this.reservationType = "INV";
        this.status = status;
        this.voided = voided;
        this.picked = picked;
        this.batchId = batchId;
        this.warehouseId = warehouseId;
    }

    public void createReservation_BKO(Long id, Long productId, int quantity, String status, boolean voided, boolean picked, Long unplannedDailyDemandId) {
        this.id = id;
        this.productId = productId;
        this.quantity = quantity;
        this.reservationType = "BKO";
        this.status = status;
        this.voided = voided;
        this.picked = picked;
        this.unplannedDailyDemandId = unplannedDailyDemandId;
        this.warehouseId = new Long(0);
    }

    public String getAvailabilityDate() {
        return availabilityDate;
    }

    public void setAvailabilityDate(String availabilityDate) {
        this.availabilityDate = availabilityDate;
    }

    public Long getBatchId() {
        return batchId;
    }

    public void setBatchId(Long batchId) {
        this.batchId = batchId;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public boolean isPicked() {
        return picked;
    }

    public void setPicked(boolean picked) {
        this.picked = picked;
    }

    public String getPlannedDailyDemandId() {
        return plannedDailyDemandId;
    }

    public void setPlannedDailyDemandId(String plannedDailyDemandId) {
        this.plannedDailyDemandId = plannedDailyDemandId;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public int getQuantity() {
        return quantity;
    }

    public void setQuantity(int quantity) {
        this.quantity = quantity;
    }

    public String getReservationType() {
        return reservationType;
    }

    public void setReservationType(String reservationType) {
        this.reservationType = reservationType;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Long getUnplannedDailyDemandId() {
        return unplannedDailyDemandId;
    }

    public void setUnplannedDailyDemandId(Long unplannedDailyDemandId) {
        this.unplannedDailyDemandId = unplannedDailyDemandId;
    }

    public boolean isVoided() {
        return voided;
    }

    public void setVoided(boolean voided) {
        this.voided = voided;
    }

    public Long getWarehouseId() {
        return warehouseId;
    }

    public void setWarehouseId(Long warehouseId) {
        this.warehouseId = warehouseId;
    }
}
